<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCouponGoodsCategoryTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('coupon_goods_category', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->timestamps();

            $table->integer('coupon_rule_id')->unsigned()->comment('优惠券规则表id');

            $table->integer('category_id')->unsigned()->comment('分类表id');

        });

        DB::statement("ALTER TABLE `coupon_goods_category` COMMENT='优惠券商品分类表'");//表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('coupon_goods_category');
    }
}
